import './App.css'
import { useTranslation}   from 'react-i18next'
import TroggleTheme from './components/TroggleTheme'
function App() {
  const { t, i18n } = useTranslation()
  const troggleLanguage = ()=>{
    i18n.changeLanguage(i18n.language==='zh'?'en':'zh')
  }
  return (
    <div>111111
      <TroggleTheme></TroggleTheme>
      <div>
        <p>{t('Welcome to React')}</p>
        <p>{t('learn react')}</p>
        <button onClick={troggleLanguage}>{i18n.language}</button>
      </div>
    </div>
  )
}

export default App
